<!DOCTYPE html>
<html lang="es">
	<head>
		<meta charset="utf-8">
		<title>Formulario pregunta</title>
	</head>
	<body>
		<!-- JQuery -->
		<script src="../jquery/js/jquery-1.9.1.js"></script>
		<!-- UI JQuery -->
		<script src="../jquery/js/jquery-ui-1.10.3.custom.js"></script>
	
		<form>
  <div><input type="text" name="a" value="1" id="a"></div>
  <div><input type="text" name="b" value="2" id="b"></div>
  <div><input type="hidden" name="c" value="3" id="c"></div>
  <div>
    <textarea name="d" rows="8" cols="40">4</textarea>
  </div>
  <div><select name="e">
    <option value="5" selected="selected">5</option>
    <option value="6">6</option>
    <option value="7">7</option>
  </select></div>
  <div>
    <input type="checkbox" name="f" value="8" id="f">
  </div>
  <div>
    <input type="submit" name="g" value="Submit" id="g">
  </div>
</form>
	
		<script>
			/* $(document).on("ready", formulario);
			function formulario() {
				
				
				var pregun = ;
				var urlAsignatura = "../dispatcher/referencias/asignaturas";
	
				

			// Para hacer el submit del formulari
			$('#incluir_pregunta').submit(function(event) {
				var data = JSON.stringify($('form').serializeObject());
		 		 $.ajax({
		               type: "POST",
		                url: "../dispatcher/pregunta/incluirPregunta.json",
		                data: data,
		                beforeSend: function(xhr) {  
		                    xhr.setRequestHeader("Accept", "application/json");  
		                    xhr.setRequestHeader("Content-Type", "application/json");  
		                },  
		                success: function (datos) {
		                    if (datos) {
		                        alert("Funciona :-)");
		                    }
		                    else {
		                        alert("No funciona :-(");
		                    }
		                }
		            });
			}); */
			$( "form" ).submit(function( event ) {
				 
				  event.preventDefault();
				});
	        </script>
	</body>
</html>